#ifndef _REG_H
#define _REG_H


class Reg{
public:
	bool isValue;
	int value;
	int hash;	//>0 means origined from reg, <0 means origined from mem
	int delta;
	int coefficient;
	Reg operator=(Reg b){
		isValue = b.isValue;
		value = b.value;
		hash = b.hash;
		delta = b.delta;
		coefficient = b.coefficient;
		return *this;
	}
	Reg init(int _hash){
		isValue = false;
		hash = _hash;
		delta = 0;
		coefficient = 1;
		return *this;
	}
};

class RegFile{
public:
	static Reg reg[32];
public:
	RegFile(){
		init();
	}
	static int init();
};

#endif
